package com.tebiecloud.common.exception;

import com.tebiecloud.common.constants.ResultEnum;
import lombok.Data;

/**
 * 基础错误异常
 * @Author: tebie
 * @Date: 2019-08-08 10:24
 */
@Data
public class BaseException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private int code = ResultEnum.ERROR.getCode();

    public BaseException() {
    }

    public BaseException(String msg) {
        super(msg);
    }

    public BaseException(int code, String msg) {
        super(msg);
        this.code = code;
    }

    public BaseException(int code, String msg, Throwable cause) {
        super(msg, cause);
        this.code = code;
    }

}
